home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
OS2
/
PMDIB1.ARJ
/
CALLDIB.C
< prev
next >
Wrap
Text File
|
1992-01-10
|
1KB
|
60 lines
/* calldib.c - call PMDIB dll from Full Screen
(c) MIDORI S.A. 1991-1992
by skarbat@informat
*/
#define INCL_DOS
#include <os2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <io.h>
#include "pmdib.h"
// global vars
char chImagen[80] ;
int rc ;
int main (int argc, char *argv[])
{
// parse args
if (argc < 2)
{
DosBeep (1500, 250) ;
return -1 ;
}
else
strcpy (chImagen, argv[1]) ;
// Load spec bmp file
if (access (argv[1], 0))
return -2 ;
// Calling API...
rc = PMDIBDLL (chImagen, DIB_CREATE_BMP, NULL) ;
if (rc != DIBERR_OK) {
DosBeep (3250, 250) ;
return -3 ;
}
// delay time to allow PMDIB come out
DosSleep (5000) ;
do {
// Call pmdib as long as its window exists
rc = PMDIBDLL (chImagen, DIB_BMP_WND_STRETCH_ON, NULL) ;
} while (rc != DIBERR_PMDIBDLL_NOEXISTS) ;
return 0 ;
} // main()